Skip to content

Comments

feat: isolate receiver/sender loop from the app-server#11313

Open
jif-oai wants to merge 6 commits intomainfrom
jif/isolate-appserver-request-loop
Open

feat: isolate receiver/sender loop from the app-server#11313
jif-oai wants to merge 6 commits intomainfrom
jif/isolate-appserver-request-loop

Conversation

@jif-oai
Copy link
Collaborator

@jif-oai jif-oai commented Feb 10, 2026

To avoid deadlock on back-pressure we isolate sending/receiving loops in the app-server an introduce a new error if the sending queue is full

@jif-oai jif-oai changed the title Document app-server backpressure and add overload handling feat: isole receiver/sender loop from the app-server Feb 10, 2026
@jif-oai jif-oai changed the title feat: isole receiver/sender loop from the app-server feat: isolate receiver/sender loop from the app-server Feb 10, 2026
@jif-oai
Copy link
Collaborator Author

jif-oai commented Feb 10, 2026

@codex review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5cba950f25

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +408 to +410
Err(mpsc::error::TrySendError::Full(_)) => {
break;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep retrying deferred close events when queue is full

When try_send(TransportEvent::ConnectionClosed { .. }) returns Full, this branch just breaks and retries only after another outbound/control event arrives. If the queue later drains while the server is otherwise idle, the deferred close is never delivered, leaving a stale connection in the processor (and in stdio mode this can prevent shutdown_when_no_connections from ever triggering). This close-notification path needs a retry mechanism that does not depend on new outbound traffic.

Useful? React with 👍 / 👎.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems legit?

Comment on lines +408 to +410
Err(mpsc::error::TrySendError::Full(_)) => {
break;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems legit?

@jif-oai jif-oai closed this Feb 11, 2026
@jif-oai jif-oai reopened this Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants